package com.example.blog.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("comments")
public class Comments {
   @TableId(type = IdType.AUTO)
   private Long cid;
   private String wid;
   private String content;
   private String dateTime;
   private long uid;
   @TableField(exist = false)
   private long delUid; //delUid
   @TableField("reply_cid")
   private long replyCid;
   @TableField("reply_uid")
   private long replyUid;
   @TableField(exist = false)
   private int index;
   @TableField(exist = false)
   private String wTitle;
   private String platform;
   private Integer statue;

   public Comments( String wid, String content, long uid, long replyCid, long replyUid, String platform) {
      this.wid = wid;
      this.content = content;
      this.uid = uid;
      this.replyCid = replyCid;
      this.replyUid = replyUid;
      this.platform = platform;
   }
}
